Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap resetDirty in a useCallback #7029

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

anthony-dandrea
Copy link
Contributor

I am using useForm and had the result in a dependency array. I noticed that it caused needless executions. I ended up destructuring the result of useForm and adding those items to the dependency array. I noticed it worked except for resetDirty. It appears it's the only action not wrapped in a useCallback. I don't see any reason why it couldn't be so I cut a quick PR.

Semi-related issue: #5338

@mr-pinzhang

This comment has been minimized.

@rtivital rtivital merged commit a58f00b into mantinedev:master Nov 7, 2024
1 check passed
@rtivital
Copy link
Member

rtivital commented Nov 7, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants